home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-01 / pdcurs21.zip / PORTABLE.ZIP / WADDCH.C < prev    next >
Text File  |  1992-11-21  |  4KB  |  87 lines

  1. #define        CURSES_LIBRARY  1
  2. #include <curses.h>
  3. #undef waddch
  4.  
  5. #ifndef        NDEBUG
  6. char *rcsid_waddch = "$Header: c:/curses/portable/RCS/waddch.c%v 2.0 1992/11/15 03:29:20 MH Rel $";
  7. #endif
  8.  
  9.  
  10.  
  11.  
  12. /*man-start*********************************************************************
  13.  
  14.   waddch()     - add character to window
  15.  
  16.   X/Open Description:
  17.        The routine addch inserts the character ch into the default
  18.        window at the current cursor position and the window cursor is
  19.        advanced.  The character is of the type chtype as containing
  20.        both data and attributes.
  21.  
  22.        The routine waddch inserts the character ch into the specified
  23.        window at the current cursor position.  The cursor position is
  24.        advanced.
  25.  
  26.        The routine mvaddch moves the cursor to the specified (y, x)
  27.        position and inserts the character ch into the default window.
  28.        The cursor position is advanced after the character has been
  29.        inserted.
  30.  
  31.        The routine mvwaddch moves the cursor to the specified (y, x)
  32.        position and inserts the character ch into the specified
  33.        window.  The cursor position is advanced after the character
  34.        has been inserted.
  35.  
  36.        All these routines are similar to putchar.  The following
  37.        information applies to all the routines.
  38.  
  39.        If the cursor moves on to the right margin, an automatic
  40.        newline is performed.  If scrollok is enabled, and a character
  41.        is added to the bottom right corner of the screen, the
  42.        scrolling region will be scrolled up one line.  If scrolling
  43.        is not allowed, ERR will be returned.
  44.  
  45.        If ch is a tab, newline, or backspace, the cursor will be
  46.        moved appropriately within the window.  If ch is a newline,
  47.        the clrtoeol routine is called before the cursor is moved to
  48.        the beginning of the next line.  If newline mapping is off,
  49.        the cursor will be moved to the next line, but the x
  50.        coordinate will be unchanged.  If ch is a tab the cursor is
  51.        moved to the next tab position within the window.  If ch is
  52.        another control character, it will be drawn in the ^X
  53.        notation.  Calling the inch routine after adding a control
  54.        character returns the representation of the control character,
  55.        not the control character.
  56.  
  57.        Video attributes can be combined with a character by ORing
  58.        them into the parameter.  This will result in these attributes
  59.        being set.  The intent here is that text, including
  60.        attributes, can be copied from one place to another using inch
  61.        and addch.
  62.  
  63.        NOTE: addch(), mvaddch(), and mvwaddch() are macros.
  64.  
  65.   PDCurses Description:
  66.        Depending upon the state of the raw character output, 7- or
  67.        8-bit characters will be output.  NOTE: Needs work before release!
  68.  
  69.   X/Open Return Value:
  70.        The waddch() function returns OK on success and ERR on error.
  71.  
  72.   X/Open Errors:
  73.        No errors are defined for this function.
  74.  
  75.   Portability:
  76.        PDCurses        int waddch( WINDOW* win, chtype c );
  77.        X/Open Dec '88  int waddch( WINDOW* win, chtype c );
  78.        BSD Curses      int waddch( WINDOW* win, chtype c );
  79.        SYS V Curses    int waddch( WINDOW* win, chtype c );
  80.  
  81. **man-end**********************************************************************/
  82.  
  83. int    waddch(WINDOW *win, chtype c)
  84. {
  85.        return( PDC_chadd( win, (chtype)c, !(_cursvar.raw_out), TRUE ) );
  86. }
  87.